package com.tedu.egspringbootmvc.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
public class UserArticleDTO {
    @NotBlank
    @Pattern(regexp = "^[\\u4e00-\\u9fa5a-zA-Z0-9_]{1,20}$",message = "标题只能是中文、英文、数字或下划线，1-20位")
    @ApiModelProperty(value = "文章标题",required = true,example = "23年报告")
    private String title;
    @NotBlank
    @ApiModelProperty(value = "文章内容",required = true,example = "在2023年,我们在......")
    private String content;


}
